# file_path = input("test.txt")
f = open('test.txt', 'r')
QQ = []
eachone = []
floor = 11
for ch in f:
    if '角色ID：$' in ch:
        name = ch.split('$', 3)[1].split()[0]
    if '&' in ch:
        eachone = [floor, name]
        QQ.append(eachone)
        name = 'null'
        floor += 1
print(QQ)
r = open('result.txt', mode='w')
for eachitem in QQ:
    r.writelines(str(eachitem) + '\n')
f.close()
r.close()
